<!DOCTYPE html >
<html>
<head>
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.gantt.js" ></script>
    
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <title>RGraph demo: An adjustable Gantt chart with only one bar adjustable</title>
    
    
    <meta name="robots" content="noindex,nofollow" />
    <meta name="description" content="An adjustable Gantt chart with only one bar adjustable" />
     
</head>
<body>

    <!-- Share buttons -->
    <p style="float: right">
        <script>
            document.write('<a href="" target="_blank" onclick="window.open(\'https://www.facebook.com/sharer/sharer.php?u=http://www.rgraph.net' + location.pathname + '\', null, \'top=50,left=50,width=600,height=368\'); return false"><img src="../images/facebook-large.png" width="200" height="43" alt="Share on Facebook" border="0" title="Visit the RGraph Facebook page" id="facebook_link" /></a>&nbsp;');
            document.write('<a href="https://twitter.com/_rgraph" target="_blank" onclick="window.open(\'https://twitter.com/intent/tweet?text=Check%20out%20this%20demo%20of%20RGraph:%202D/3D%20JavaScript%20charts%20-%20Free%20and%20Open%20Source%20http://www.rgraph.net' + location.pathname + '\', null, \'top=50,left=50,width=700,height=400\'); return false"><img src="../images/twitter-large.png" width="200" height="43" alt="Share on Twitter" border="0" title="Mention RGraph on Twitter" id="twitter_link" /></a>');
        </script>
    </p>


    <h1>An adjustable Gantt chart with only one bar adjustable</h1>
    
    <canvas id="cvs" width="800" height="350">[No canvas support]</canvas>

    <script>
        var data = [
            [ [0, 28, 67, 'Richard'], [31, 28, 67, 'Richard'] ],
            [0, 28, 50, 'Rachel'],
            [12, 28, 45, 'Fred'],
            [ [0, 14, 0, 'Barney'], [59, 21, 5, ''] ],
            [46, 31, 92, 'Paul', null, 'red'],
            [80, 21, 46, 'Harry'],
            [94, 17, 84, 'Shane'],
            [34, 14, 32, 'Kyle'],
            [64, 14, 28, 'Cynthia'],
            [13, 61, 74, 'Mabel'],
            [84, 31, 16, 'Paul'],
            [80, 22, 45, 'Kiffen'],
            [0, 115, 50, 'John']
        ];

        new RGraph.Gantt({
            id: 'cvs',
            data: data,
            options: {
                labels: ['January', 'February', 'March', 'April'],
                xmax: 122,
                labelsPercent: true,
                backgroundGridAutofitNumvlines: 4,
                adjustable: true,
                adjustableOnly: [false,false,false,false,false,false, true]
            }
        }).draw();
    </script>






    <p></p>

    This goes in the documents header:
    <pre class="code">
&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
&lt;script src="RGraph.gantt.js"&gt;&lt;/script&gt;
</pre>
    
    Put this where you want the chart to show up:
    <pre class="code">
&lt;canvas id="cvs" width="800" height="350"&gt;
    [No canvas support]
&lt;/canvas&gt;
</pre>

    This is the code that generates the chart:
    <pre class="code">
&lt;script&gt;
    var data = [
        [ [0, 28, 67, 'Richard'], [31, 28, 67, 'Richard'] ],
        [0, 28, 50, 'Rachel'],
        [12, 28, 45, 'Fred'],
        [ [0, 14, 0, 'Barney'], [59, 21, 5, ''] ],
        [46, 31, 92, 'Paul', null, 'red'],
        [80, 21, 46, 'Harry'],
        [94, 17, 84, 'Shane'],
        [34, 14, 32, 'Kyle'],
        [64, 14, 28, 'Cynthia'],
        [13, 61, 74, 'Mabel'],
        [84, 31, 16, 'Paul'],
        [80, 22, 45, 'Kiffen'],
        [0, 115, 50, 'John']
    ];

    new RGraph.Gantt({
        id: 'cvs',
        data: data,
        options: {
            labels: ['January', 'February', 'March', 'April'],
            xmax: 122,
            labelsPercent: true,
            backgroundGridAutofitNumvlines: 4,
            adjustable: true,
            adjustableOnly: [false,false,false,false,false,false, true]
        }
    }).draw();
&lt;/script&gt;
</pre>
    
</body>
</html>